//
//  XS_BaseTableHeaderFooterView.swift
//  
//
//  Created by 韩云智 on 2021/10/5.
//

import UIKit
import RxCocoa
import RxSwift

open class XS_BaseTableHeaderFooterView: UITableViewHeaderFooterView {
    open lazy var disposeBag = DisposeBag()
    /// 单元格重用时会重置
    open lazy var reuseDisposeBag = DisposeBag()
    //单元格重用时调用
    open override func prepareForReuse() {
        super.prepareForReuse()
        reuseDisposeBag = DisposeBag()
    }
    
    deinit {
#if DEBUG
        print("deinit: \(type(of: self))")
#endif
    }
    public override init(reuseIdentifier: String?) {
        super.init(reuseIdentifier: reuseIdentifier)
#if DEBUG
        print("init: \(type(of: self))")
#endif
        upView(reuseIdentifier)
    }
    public required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    open func upView(_ reuseIdentifier: String?) {
        backgroundColor = Base_hanyz.backgroundColor
    }
}
